#ifndef LOCALDATABASE_H
#define LOCALDATABASE_H

#include <QObject>
#include <QDebug>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
#include <QSqlRecord>

class LocalDataBase : public QObject
{
    Q_OBJECT
public:
    explicit LocalDataBase(QObject *parent = nullptr);
    Q_INVOKABLE bool writeStickyNote(int,QString,long long,long long);//写入便签纸
    Q_INVOKABLE QVariantList readDataSN(int);//读取用户便签
    Q_INVOKABLE bool delStickyNote(int,int);//删除用户便签
    Q_INVOKABLE QVariantList readWarnTimeSN(int);//读取用户提醒时间表
    Q_INVOKABLE QString readImmortalClass(int);//读取等级
    Q_INVOKABLE int readCommandlistN();//读取命令条数
    Q_INVOKABLE QVariantList readCommand(int);//读取命令
    Q_INVOKABLE QVariantList readCChildrens(int);//读取用户提醒时间表
    Q_INVOKABLE int readCPrerequisite(int);//读取前提条件

private:
    QSqlDatabase db;

signals:
};

#endif // LOCALDATABASE_H
